home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java Primer Plus
/
Java Primer Plus (Waite Group Proess)(1996).iso
/
chapter16
/
native.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-12-31
|
583b
|
24 lines
/* Implementation of Native code */
/* must be compiled by architecture specific C compiler */
#include "StubPreamble.h"
#include "java_lang_String.h"
#include "MyNativeClass.h"
#include <stdio.h>
void MyNativeClass_setx(struct HMyNativeClass *this, long x)
{
unhand(this)->x = x; /* dereference the x element of the
calling class and assign it the
value of x */
}
void MyNativeClass_sety(struct HMyNativeClass *this, long y)
{
unhand(this)->y = y; /* dereference the y element of the
calling class and assign it the
value of y */
}